package com.hnevc.xiewenguang;

import java.util.Scanner;
public class Example01{

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        System.out.print("输入一个整数:");
        int number = in.nextInt();
        int num=0;
        for(int i=1;i<=number;i++){
            if(i % 7 == 0){
                num +=i ;
                System.out.println(i);
            }
        }
        System.out.println("能被7整除的数的和为："+num);
    }
}
